[bits 32]

section .text
global switch_task
switch_task:
	push esi
	push edi
	push ebx
	push ebp
	
	mov esi, [esp + 20] ; curr thread pcb
	mov edi, [esp + 24] ; next thread pcb
	
	mov [esi], esp
	
	mov esp, [edi]
	pop ebp
	pop ebx
	pop edi
	pop esi
	
	ret
	
